package com.itheima.mapper;

import com.itheima.pojo.Role;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 套餐Mapper接口
 *
 * @author itheima
 * @date 2025-03-23
 */
@Mapper
public interface UserMapper {

    // 查询用户信息
    @Select("select * from user where username = #{username}")
    public User loadUserDetiles(String username);

    // 根据用户id查询角色信息
    List<Role> loadRolesByUserId(Integer userId);
}
